﻿#ifndef ICOMMUNICATIONINIT_H
#define ICOMMUNICATIONINIT_H

#include <QObject>
#include <QJsonObject>
#include <QDialog>
#include "baseitem.h"

class BaseCommunication:public BaseItem
{
    Q_OBJECT
public:
    Q_INVOKABLE explicit BaseCommunication(QObject *parent = 0);
    virtual void SetCommunicationParam(QString communicationParam);
    virtual QString getCommParam();
    virtual bool connectToHost();
    virtual bool isConnected();
    virtual bool disConnect();

    virtual QWidget* getConfigWidget();
signals:

protected:

public slots:

    // BaseItem interface
public:
    virtual void setConfig(QJsonObject obj) override;
    virtual bool init() override;

};

#endif // ICOMMUNICATIONINIT_H
